package models

import "gorm.io/gorm"

type User struct { //用户
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(200)"`
}

type Role struct { //角色
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}

type Node struct { //权限
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type UserRole struct { //用户角色关系表
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct { //角色权限关系表
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Car struct { //车辆信息表
	gorm.Model
	CarNo    string `gorm:"type:varchar(50)"` //车辆编号
	CarName  string `gorm:"type:varchar(50)"` //车辆类型
	CarPrice string `gorm:"type:varchar(50)"` //车辆价格
}

type CarOrder struct { //车辆信息表
	gorm.Model
	OrderNo  string `gorm:"type:varchar(50)"` //订单编号
	FormAdds string `gorm:"type:varchar(50)"` //发货地址
	ToAdds   string `gorm:"type:varchar(50)"` //收货地址
	Cid      int    `gorm:"type:int"`         //车辆编号
}

type CarOrderList struct {
	OrderId  int    `gorm:"type:int"`         //订单id
	CarNo    string `gorm:"type:varchar(50)"` //车辆编号
	CarName  string `gorm:"type:varchar(50)"` //车辆类型
	CarPrice string `gorm:"type:varchar(50)"` //车辆价格
	OrderNo  string `gorm:"type:varchar(50)"` //订单编号
	FormAdds string `gorm:"type:varchar(50)"` //发货地址
	ToAdds   string `gorm:"type:varchar(50)"` //收货地址
}
